import 'package:favorcate/ui/pages/home/home_drawer.dart';
import 'package:favorcate/ui/pages/main/initialize_items.dart';
import 'package:flutter/material.dart';

class ZSMainScreen extends StatefulWidget {
  static const String routeName = '/';

  @override
  _ZSMainScreenState createState() => _ZSMainScreenState();
}

class _ZSMainScreenState extends State<ZSMainScreen> {
  int _currentIndex = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: IndexedStack(index: _currentIndex, children: pages),
      bottomNavigationBar: BottomNavigationBar(
        items: items,
        selectedFontSize: 14,
        unselectedFontSize: 14,
        currentIndex: _currentIndex,
        onTap: (index) {
          setState(() {
            _currentIndex = index;
          });
        },
      ),
      drawer: ZSHomeDrawer(),
    );
  }
}
